package flexCom.dividedBox
{
	import flash.events.Event;
	
	import mx.containers.DividedBox;
	import mx.events.DividerEvent;
	//import mx.containers.DividedBoxHacked;

	public class HDividedBoxConstantUpdate extends DividedBox
	{
		public var lastDividerIndex:int = 0;
		public function HDividedBoxConstantUpdate()
		{
			addEventListener(DividerEvent.DIVIDER_PRESS, dividerFocus, false, 0, true);
			this.addEventListener(Event.REMOVED_FROM_STAGE, isRemoved, false, 0, true);
			super();
			liveDragging = true;
			this.direction = "horizontal";
		}
		private function dividerFocus (e:DividerEvent) :void {
			trace("divider press");
			lastDividerIndex = e.dividerIndex;
			//moveDivider(e.dividerIndex, e.delta);
			
		}
		private function isRemoved (e:Event) :void {
			removeEventListener(DividerEvent.DIVIDER_PRESS, dividerFocus, false);
			this.removeEventListener(Event.REMOVED_FROM_STAGE, isRemoved, false);
		}
		
		
		
	}
}